package com.gitee.wsl.ext.db

import androidx.room.Room
import androidx.room.RoomDatabase
import com.gitee.wsl.Lib
import com.gitee.wsl.ext.config
import com.gitee.wsl.ext.string.div

actual inline fun <reified T : RoomDatabase> roomDatabaseBuilder(
    name: String,
    isMultiInstance: Boolean,
): RoomDatabase.Builder<T> {
    val dbFile = Lib.config.appDirs.getUserDataDir() / name
    return Room.databaseBuilder<T>(
        name = dbFile,
    )
}
